<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html">
    <h:head>
        <title>Botões, links e entradas de texto</title>
    </h:head>
    <h:body>
        <h:form id="formulario">
            <h:commandButton value="Executar" 
                             action="#{controleComponentes.executar()}" 
                             id="btnEnviar"
                             actionListener="#{controleComponentes.listener}"/><br />

            <h:commandLink value="Executar" 
                           action="#{controleComponentes.executar()}" 
                           id="cmdEnviar"
                           actionListener="#{controleComponentes.listener}"
                           onclick="alert('O botão foi clicado')"
                           /><br />
            
            <h:outputText value="#{controleComponentes.idComponente}"/>
            <h:button outcome="loginPage" value="Página de login"/>
            <h:link outcome="loginPage" value="Página de login"/>
        </h:form>
        <h:outputLink value="http://www.devmedia.com.br"> DEVmedia</h:outputLink>
    </h:body>
</html>

